<?php

require_once 'captchaView.php';
require_once 'captchaHandler.php';

class Test{

	public function captchaTest()
	{
		$CaptchaHandler = new CaptchaHandler();

		$captchatext = $CaptchaHandler->CreateImageText();

		if ($captchatext == false) {
			echo "Kunde inte skapa en text";
			return false;
		}

		if ($CaptchaHandler->CompareTexts($captchatext) == false) {
			echo "Texterna stämde inte överrens";
			return false;
		}
		return true;
	}	
}
$Test = new Test();

if($Test->captchaTest()){
	echo "Alla tester gick kanonbra";
}